package org.durandj.ystream.server.network;

/**
 * Similar to the {@link MessageID} enumerator except for
 * the {@link Packet} class. This is however a class
 * and not an enumerator for convenience sake. The
 * opcodes are divided into two sections, client opcodes
 * and server opcodes.
 * 
 * @author durandj
 * @version 1.0
 *
 */
public class Opcode
{
	/**
	 * <p>Sent by either the client or the server. This operation does nothing.</p>
	 * 
	 * <p>Params:</p>
	 * 	<p>None</p>
	 */
	public static final int NOP = 0;
	
	/**
	 * <p>Sent by the client to the server when the client is going to disconnect.</p>
	 * 
	 * <p>Params:</p>
	 * 	<p>None</p>
	 */
	public static final int SERVER_DISCONNECT = 1;
	
	/**
	 * <p>Sent by the server to the client when the server disconnects the client.</p>
	 * 
	 * <p>Params:</p>
	 * 	<p>None</p>
	 */
	public static final int CLIENT_DISCONNECT = 2;
	
	/**
	 * <p>Sent to either the server or the client to determine the delay time. Random
	 * data should be sent with the packet and then checked when it is echoed back.</p>
	 * 
	 * <p>Params:</p>
	 * 	<p>Random data</p>
	 */
	public static final int PING = 3;
}
